﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using VisionCloud.Core.Model;
using VisionCloud.Core.Model.Enums;

namespace VisionCloud.Core.Model.Sys
{
    /// <summary>
    /// 上传安装包文件记录
    /// </summary>
    [Table("SysPackFileUpload")]
    public class SysPackFileUpload : BaseEntity
    {
        [Key]
        public Guid Id { get; set; }

        public string Version { get; set; }

        /// <summary>
        /// 升级描述
        /// </summary>
        public string Description { set; get; }

        /// <summary>
        /// 上传的升级包地址
        /// </summary>
        public string FilePath { set; get; }

        public string FileKey { set; get; }

        /// <summary>
        /// 设备平台
        /// </summary>
        public DevicePlatformEnum DevicePlatform { set; get; } = DevicePlatformEnum.FARO;

        /// <summary>
        /// 1:差分包,0:全量包
        /// </summary>
        public bool IsDifferential { get; set; }

        /// <summary>
        /// 可升级的最低版本限制，如5.2.0；全量更新包为空，代表无限制
        /// </summary>
        public string LimitVersion { get; set; } = string.Empty;
    }
}
